3.158 \(\int (a+b \log (c x^n)) (d+e \log (f x^r)) \, dx\)

Optimal. Leaf size=77 \[ -e r x (a-b n)+a x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-b e r x \log \left (c x^n\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b e n r x \]

[Out]

b*e*n*r*x - e*(a - b*n)*r*x - b*e*r*x*Log[c*x^n] + a*x*(d + e*Log[f*x^r]) - b*n*x*(d + e*Log[f*x^r]) + b*x*Log
[c*x^n]*(d + e*Log[f*x^r])

________________________________________________________________________________________

Rubi [A]  time = 0.0355213, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2295, 2361} \[ -e r x (a-b n)+a x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-b e r x \log \left (c x^n\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b e n r x \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

b*e*n*r*x - e*(a - b*n)*r*x - b*e*r*x*Log[c*x^n] + a*x*(d + e*Log[f*x^r]) - b*n*x*(d + e*Log[f*x^r]) + b*x*Log
[c*x^n]*(d + e*Log[f*x^r])

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.)), x_Symbol] :> With[{u =
IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[SimplifyIntegrand[u/x, x], x],
 x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]

Rubi steps

\begin{align*} \int \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right ) \, dx &=a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-(e r) \int \left (a-b n+b \log \left (c x^n\right )\right ) \, dx\\ &=-e (a-b n) r x+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-(b e r) \int \log \left (c x^n\right ) \, dx\\ &=b e n r x-e (a-b n) r x-b e r x \log \left (c x^n\right )+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.0210132, size = 58, normalized size = 0.75 \[ x \left (e (a-b n) \log \left (f x^r\right )+a d-a e r+b \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )-e r\right )-b d n+2 b e n r\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

x*(a*d - b*d*n - a*e*r + 2*b*e*n*r + e*(a - b*n)*Log[f*x^r] + b*Log[c*x^n]*(d - e*r + e*Log[f*x^r]))

________________________________________________________________________________________

Maple [C]  time = 0.154, size = 1503, normalized size = 19.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*(d+e*ln(f*x^r)),x)

[Out]

-1/2*I*Pi*b*d*x*csgn(I*c*x^n)^3-1/4*Pi^2*b*e*x*csgn(I*c*x^n)^3*csgn(I*f*x^r)^3+1/4*Pi^2*b*e*x*csgn(I*c*x^n)^3*
csgn(I*x^r)*csgn(I*f*x^r)^2+1/2*I*Pi*b*d*x*csgn(I*c)*csgn(I*c*x^n)^2-1/2*I*Pi*b*e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i*b*e*x*csgn(I*x^r)*csgn(I*f*x
^r)^2*ln(x^n)-r*a*e*x+ln(c)*ln(f)*b*e*x-ln(c)*b*e*r*x-ln(f)*b*e*n*x+ln(f)*b*e*x*ln(x^n)+1/2*I*Pi*a*e*x*csgn(I*
x^r)*csgn(I*f*x^r)^2+1/4*Pi^2*b*e*x*csgn(I*c)*csgn(I*c*x^n)^2*csgn(I*f*x^r)^3+1/4*Pi^2*b*e*x*csgn(I*x^n)*csgn(
I*c*x^n)^2*csgn(I*f*x^r)^3-b*e*r*x*ln(x^n)+1/4*Pi^2*b*e*x*csgn(I*c*x^n)^3*csgn(I*f)*csgn(I*f*x^r)^2-1/4*Pi^2*b
*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)

________________________________________________________________________________________

Maxima [A]  time = 1.22239, size = 111, normalized size = 1.44 \begin{align*}{\left ({\left (2 \, r - \log \left (f\right )\right )} x - x \log \left (x^{r}\right )\right )} b e n - b d n x - a e r x -{\left (r x - x \log \left (f x^{r}\right )\right )} b e \log \left (c x^{n}\right ) + b d x \log \left (c x^{n}\right ) + a e x \log \left (f x^{r}\right ) + a d x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="maxima")

[Out]

((2*r - log(f))*x - x*log(x^r))*b*e*n - b*d*n*x - a*e*r*x - (r*x - x*log(f*x^r))*b*e*log(c*x^n) + b*d*x*log(c*
x^n) + a*e*x*log(f*x^r) + a*d*x

________________________________________________________________________________________

Fricas [A]  time = 0.90382, size = 270, normalized size = 3.51 \begin{align*} b e n r x \log \left (x\right )^{2} -{\left (b e r - b d\right )} x \log \left (c\right ) -{\left (b d n - a d -{\left (2 \, b e n - a e\right )} r\right )} x +{\left (b e x \log \left (c\right ) -{\left (b e n - a e\right )} x\right )} \log \left (f\right ) +{\left (b e r x \log \left (c\right ) + b e n x \log \left (f\right ) +{\left (b d n -{\left (2 \, b e n - a e\right )} r\right )} x\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="fricas")

[Out]

b*e*n*r*x*log(x)^2 - (b*e*r - b*d)*x*log(c) - (b*d*n - a*d - (2*b*e*n - a*e)*r)*x + (b*e*x*log(c) - (b*e*n - a
*e)*x)*log(f) + (b*e*r*x*log(c) + b*e*n*x*log(f) + (b*d*n - (2*b*e*n - a*e)*r)*x)*log(x)

________________________________________________________________________________________

Sympy [A]  time = 3.35767, size = 151, normalized size = 1.96 \begin{align*} a d x + a e r x \log{\left (x \right )} - a e r x + a e x \log{\left (f \right )} + b d n x \log{\left (x \right )} - b d n x + b d x \log{\left (c \right )} + b e n r x \log{\left (x \right )}^{2} - 2 b e n r x \log{\left (x \right )} + 2 b e n r x + b e n x \log{\left (f \right )} \log{\left (x \right )} - b e n x \log{\left (f \right )} + b e r x \log{\left (c \right )} \log{\left (x \right )} - b e r x \log{\left (c \right )} + b e x \log{\left (c \right )} \log{\left (f \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*(d+e*ln(f*x**r)),x)

[Out]

a*d*x + a*e*r*x*log(x) - a*e*r*x + a*e*x*log(f) + b*d*n*x*log(x) - b*d*n*x + b*d*x*log(c) + b*e*n*r*x*log(x)**
2 - 2*b*e*n*r*x*log(x) + 2*b*e*n*r*x + b*e*n*x*log(f)*log(x) - b*e*n*x*log(f) + b*e*r*x*log(c)*log(x) - b*e*r*
x*log(c) + b*e*x*log(c)*log(f)

________________________________________________________________________________________

Giac [A]  time = 1.31551, size = 165, normalized size = 2.14 \begin{align*} b n r x e \log \left (x\right )^{2} - 2 \, b n r x e \log \left (x\right ) + b r x e \log \left (c\right ) \log \left (x\right ) + b n x e \log \left (f\right ) \log \left (x\right ) + 2 \, b n r x e - b r x e \log \left (c\right ) - b n x e \log \left (f\right ) + b x e \log \left (c\right ) \log \left (f\right ) + b d n x \log \left (x\right ) + a r x e \log \left (x\right ) - b d n x - a r x e + b d x \log \left (c\right ) + a x e \log \left (f\right ) + a d x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="giac")

[Out]

b*n*r*x*e*log(x)^2 - 2*b*n*r*x*e*log(x) + b*r*x*e*log(c)*log(x) + b*n*x*e*log(f)*log(x) + 2*b*n*r*x*e - b*r*x*
e*log(c) - b*n*x*e*log(f) + b*x*e*log(c)*log(f) + b*d*n*x*log(x) + a*r*x*e*log(x) - b*d*n*x - a*r*x*e + b*d*x*
log(c) + a*x*e*log(f) + a*d*x